package com.icehand.common.exception;

import com.icehand.common.code.CodeEnum;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author icehand
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class BizException extends BaseException {
    public BizException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public BizException(CodeEnum<Integer> codeEnum) {
        this.code = codeEnum.getCode();
        this.msg = codeEnum.getMsg();
    }

    private int code;
    private String msg;
}
